class AddDefaultWalletToUser < ActiveRecord::Migration
  def self.up
    add_column :wallets, :is_default, :boolean, :default => false

    User.all.each do |user|
      wallet = user.wallets.first
      wallet.is_default = true
      wallet.save!
    end
  end

  def self.down
    remove_column :wallets, :is_default
  end
end
